<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html"; charset="utf-8" />
<title></title>

<link href="css/all.css" rel="stylesheet" type="text/css">
    <link href="js/bstable/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="js/bstable/css/bootstrap-table.css" rel="stylesheet" type="text/css">

</head>
<body>

<div class="div_find">

    <p><label class="find_labela">时间：</label><select class="find_input">
    	<option>全部</option>
        <option>2019</option>	
        <option>2018</option>
        <option>2017</option>


    </select><label class="find_labela">提出者：</label><input type="text" class="find_input">



    </select>
        <label class="find_labela">提案号：</label><input type="text" class="find_input">
    </p>
    <p><label class="find_labela">提案形式：</label><select class="find_input">
        <option>个人提案</option>
        <option>集体提案</option>
        <option>联名提案</option>


    </select>
        <label class="find_labela">提案类别：</label><select class="find_input">
        	<option>全部</option>
            <option>快递</option>
            <option>吃的</option>             
            <option>其它</option>
        </select>

        

</select><label class="find_labela">提案状态：</label><select class="find_input">
    <option>全部</option>
    <option>已完成</option>
    <option>未完成</option>
</select>
        <input type="button" value="搜索一下" class="find_but" id="but_open"><input type="button" value="重置" class="find_but" id="but_close02">
    <p class="p_but">

        <i class="down_i" ></i><a href="#" class="add_a">导出</a>
        <i class="print_i" ></i><a href="#" class="add_a">打印</a>
   </p>
<p>
	
    <table data-url="json/data_alae_list.json" id="table" class="table_style" style="margin: 0 auto">
    	<c:forEach items="${page.list}" var="p">
    	<tr>
	    	<td class="bs-checkbox "><input name="btSelectItem" type="checkbox" value="${p.id }"></td>
	    	<td style="text-align: center; vertical-align: middle; ">${p.id }</td>
	    	<td style="text-align: center; vertical-align: middle; ">${p.type }</td>
	    	<td style="text-align: center; vertical-align: middle; ">${p.content }</td>
	    	<td style="text-align: center; ">${p.user.name }</td>
	    	<td style="text-align: center; ">2017-02-13</td>
	    	<td style="text-align: center; ">2017-03-30</td>
	    	<td style="text-align: center; ">${p.price }</td>
	    	<td style="text-align: center; ">${p.people }</td>
	    	<td style="text-align: center; "><c:if test="${p.accept==ture&&p.finish.equals('未完成')}">未完成</c:if>	    	
	    	<c:if test="${p.accept==false}">未被接受</c:if>
	    	</td>
	    	<td style="text-align: center; ">
	    	<a href="addRecive?id=${p.id}" title="接受" >
	    	<c:if test="${p.accept==ture&&p.finish}">完成</c:if>
	    	<c:if test="${p.accept==false}"></c:if>
	    	</a>
	    	 </td>
    	</tr>
    </c:forEach>
     </table>
</p>

<script src="js/jquery/jQuery-2.2.0.min.js"></script>
<script src="js/bstable/js/bootstrap.min.js"></script>
<script src="js/bstable/js/bootstrap-table.js"></script>
<script src="js/bstable/js/bootstrap-table-zh-CN.min.js"></script>
<script src="js/date/js/laydate.js"></script>
<script>
    !function(){
        laydate.skin('danlan');//切换皮肤，请查看skins下面皮肤库
        laydate({elem: '#demo'});
        laydate({elem: '#demo1'});//绑定元素
    }();
</script>

<script type="text/javascript">
    $(function () {
        $('#table').bootstrapTable({
            method: "get",
            striped: true,
            singleSelect: false,
            url: "findDemand",
            dataType: "json",
            pagination: true, //分页
            pageSize: 10,
            pageNumber: 1,
            search: false, //显示搜索框
            contentType: "application/x-www-form-urlencoded",
            queryParams: null,
            columns: [
                {
                    checkbox: "true",
                    field: 'check',
                    align: 'center',
                    valign: 'middle'
                }
                ,
                {
                    title: "提案号",
                    field: 'id',
                    align: 'center',
                    valign: 'middle',
                    value:  'list.id'
                    
                },
                {
                    title: '提案类别',
                    field: 'class',
                    align: 'center',
                    valign: 'middle',
                    value:  'list.type'
                    
                },
                {
                    title: '详细信息',
                    field: 'resouce',
                    align: 'center',
                    valign: 'middle',
                    
                },
                {
                    title: '提案者',
                    field: 'person',
                    align: 'center'
                },

                {
                    title: '提出时间',
                    field: 'date01',
                    align: 'center'
                },
                
                {
                    title: '完成时间',
                    field: 'date02',
                    align: 'center'
                },
                {
                    title: '金额',
                    field: 'money',
                    align: 'center'
                },
                {
                    title: '需求对象',
                    field: 'who',
                    align: 'center'
                },

                {
                    title: '提案状态',
                    field: 'type',
                    align: 'center'
                },

                {
                    title: '接受',
                    field: 'opear',
                    align: 'center',
                    /* formatter: function (value, row) {
                        var e = '<a  href="addRecive?id=${p.id}" title="接受">接受</a> ';


                        return e ; 
                    }*/
                }
            ]
        });
    })

</script>
<script src="js/layer_v2.1/layer/layer.js"></script>
<script>
    function openlayer(id){
        layer.open({
            type: 2,
            title: '添加信息',
            shadeClose: true,
            shade: 0.5,
            skin: 'layui-layer-rim',
//            maxmin: true,
            closeBtn:1,
            area: ['98%', '92%'],
            shadeClose: true,
            closeBtn: 1,
            content: 'lay01.html'
            //iframe的url
        });
    }
</script>
<script>
    $(function () {
        $(".find_span").click(function () {
            $("#open").show();
            $(this).hide();
            $(".find_span1").show();
            $("#but_close02").hide();
            $("#but_open").hide();

        })
        $(".find_span1").click(function () {
            $("#open").hide();
            $(this).hide();
            $(".find_span").show();
            $("#but_open").show();
            $("#but_close02").show();

        })

    })
</script>

</body>
</html>
